package com.coolingme.calculate.expression.nonterminal;

import com.coolingme.calculate.IMathExpression;
import com.coolingme.calculate.expression.TerminalExpression;

/**
 * 减法解释器
 *
 * @author wangyue
 * @date 2020-09-29 22:41
 */
public class SubTractExpression extends TerminalExpression {

    public SubTractExpression(IMathExpression left, IMathExpression right) {
        super(left, right);
    }

    @Override
    public int interpret() {
        return this.left.interpret() - this.right.interpret();
    }
}
